<?php
    session_start();
    
    if(isset($_SESSION['id'])){
        require 'phpclasses/userclass.php';
        $user = new userclass();
        $user->initwithuserid($_SESSION['id']);
        
        require 'phpclasses/userprofileclass.php';
        $userprofile = new userprofileclass();
        $userprofile->initwithuserid($_SESSION['id']);
    }
    
    if($user->role != 'couple')
        header('Location: index.php');
    
    $lang = $_SESSION['lang'];
    include 'phpincludes/'.$lang.'.php';
    
    if(isset($_GET['showitem']))
        $showitem = $_GET['showitem'];
    else
        $showitem = $topmenuiteminfo;
    
    if(!($userprofile->id > 0) || $userprofile->profilepic == '')
            $userprofile->profilepic = 'profileneutral.png';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:fb="http://ogp.me/ns/fb#">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>My Wedding Book</title>
        <link rel="icon" type="image/png" href="img/favicon.png" />
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script src="js/profileeditbox.js"></script>
        <link href="css/style.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <div class="sitecontent">
            <div class="topbar">
                <?php include 'phpincludes/topbar.php'; ?>
            </div>
            <div class="maincontent">
                <div class="profilepic">
                    <img src="<?php echo 'upload/'.$userprofile->profilepic; ?>" width="100" height="100" alt="Profile Pic" />
                </div>
                <div class="topmenu">
                    <?php include 'phpincludes/topmenu.php'; ?>
                </div>
                <div class="pagecontent">
                    <?php include 'phpincludes/couplepagecontent.php'; ?>
                </div>
            </div>
        </div>
        <div class="sideads">
            Ads here
        </div>
    </body>
</html>
